package com.hms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 客户基本信息<br>
 * 类详细说明.
 * <p>
 * Copyright: Copyright (c) 2013-4-13 上午10:49:16
 * <p>
 * Company: 北京宽连十方数字技术有限公司
 * <p>
 * 
 * @author wangpz@c-platform.com
 * @version 1.0.0
 */
@Entity
@Table(name = "td_customer")
public class TdCustomer extends BaseEntity {

	/** serialVersionUID */
	private static final long serialVersionUID = 1L;

	// 公司性质
	public enum CompanyNature {
		private_company;
	}

	// 公司规模
	public enum CompanySize {
		Less_than_50, Between_50_to_100, Between_100_to_200, Between_200_to_500, More_than_500;
	}

	// 客户编号
	private String customerId;

	// 名称
	private String name;

	// 中文简称
	private String zhShortName;

	// 英文简称
	private String enShortName;

	// 公司规模
	private CompanySize companySize;

	// 公司性质
	private CompanyNature companyNature;

	// 公司行业
	private TdIndustry companyIndustry;

	// 客户类型
	private TdCommonData customerType;

	// 所处城市
	private TdLocation location;

	// 客户经理
	private Admin accountManager;

	// 公司主页
	private String companyHome;

	// 地址
	private String address;

	// 公司关键字
	private String companyKeys;

	// 公司简介
	private String summary;

	@Column(name = "customerId", nullable = false, unique = true)
	public String getCustomerId() {
		return customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "zhShortName")
	public String getZhShortName() {
		return zhShortName;
	}

	public void setZhShortName(String zhShortName) {
		this.zhShortName = zhShortName;
	}

	@Column(name = "enShortName")
	public String getEnShortName() {
		return enShortName;
	}

	public void setEnShortName(String enShortName) {
		this.enShortName = enShortName;
	}

	@Enumerated
	@Column(name = "companySize")
	public CompanySize getCompanySize() {
		return companySize;
	}

	public void setCompanySize(CompanySize companySize) {
		this.companySize = companySize;
	}

	@Enumerated
	@Column(name = "companyNature")
	public CompanyNature getCompanyNature() {
		return companyNature;
	}

	public void setCompanyNature(CompanyNature companyNature) {
		this.companyNature = companyNature;
	}

	@ManyToOne
	@JoinColumn(name = "companyIndustry")
	public TdIndustry getCompanyIndustry() {
		return companyIndustry;
	}

	public void setCompanyIndustry(TdIndustry companyIndustry) {
		this.companyIndustry = companyIndustry;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customerType")
	public TdCommonData getCustomerType() {
		return customerType;
	}

	public void setCustomerType(TdCommonData customerType) {
		this.customerType = customerType;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "location")
	public TdLocation getLocation() {
		return location;
	}

	public void setLocation(TdLocation location) {
		this.location = location;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "accountManager", referencedColumnName = "id")
	public Admin getAccountManager() {
		return accountManager;
	}

	public void setAccountManager(Admin accountManager) {
		this.accountManager = accountManager;
	}

	@Column(name = "companyHome")
	public String getCompanyHome() {
		return companyHome;
	}

	public void setCompanyHome(String companyHome) {
		this.companyHome = companyHome;
	}

	@Column(name = "address")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "companyKeys")
	public String getCompanyKeys() {
		return companyKeys;
	}

	public void setCompanyKeys(String keys) {
		this.companyKeys = keys;
	}

	@Column(name = "summary")
	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

}
